package intf

import (
	C "gitee.com/ljfirst/algo-go-sdk/common/constant"
	"gitee.com/ljfirst/algo-go-sdk/src/data_structure/heap_stack_queue/stack"
	"gitee.com/ljfirst/algo-go-sdk/src/data_structure/heap_stack_queue/stack/monotonousStack"
)

/**
 * @author ljfirst
 * @version V1.0
 * @date 2023/6/25 20:55
 * @author-Email ljfirst@mail.ustc.edu.cn
 * @blogURL https://blog.csdn.net/ljfirst
 * @description stack
 * */

type StackINTF interface {
	Push(interface{})  // push value in to stack
	Pop() interface{}  // pop value from stack
	Peak() interface{} // get first value from stack
	Resize()           // extension the capacity of the stack
	Empty() bool
	Size() int
	GetAttribute() *C.Attribute
}

// 最小栈 和 单调栈
type MinStackINTF interface {
	StackINTF // grammar接口之间的继承关系
	GetMin() int
	GetAttribute() *C.Attribute
}

type MonotonousStackINTF interface {
	NextValue([]int) []int
	GetAttribute() *C.Attribute
}

var StackAssemble = map[string][]interface{}{
	"Stack": {
		&stack.ArrayStack{},
		&stack.LinkedStack{},
		&stack.QueueStack{}},
	"MinStack": {&stack.MinStack{},
		&stack.MinStackOpt{}},
	"MonotonousStack": {&monotonousStack.DailyTemperatures{},
		&monotonousStack.DailyTemperatures2{},
		&monotonousStack.GetMinValueByRemoveK{},
		&monotonousStack.MonotonousStack{}},
}
